Improve GtkColorButton behaviour
authorHiroyuki Ito <ZXB01226@nifty.com>
Thu, 17 May 2012 03:45:48 +0000 (23:45 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 17 May 2012 03:50:58 +0000 (23:50 -0400)
Select the current color of a GtkColorButton should be selected in the
GtkColoroChooserDialog which is shown when the color button is clicked.

https://bugzilla.gnome.org/show_bug.cgi?id=676198

gtk/gtkcolorbutton.c

index 7ad5cd5ea1df4bc0b8da2b1c641030f6dda7d04f..c9056b5d02023bd53afc62e587e3cd2da40c68e2 100644 (file)
@@ -619,6 +619,9 @@ gtk_color_button_clicked (GtkButton *b)
   gtk_color_chooser_set_use_alpha (GTK_COLOR_CHOOSER (button->priv->cs_dialog),
                                    button->priv->use_alpha);
 
+  gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (button->priv->cs_dialog),
+                              &button->priv->rgba);
+
   gtk_window_present (GTK_WINDOW (button->priv->cs_dialog));
 }